package Text_57;

import java.util.HashMap;
import java.util.Map;
import java.util.function.BiConsumer;

public class Code {

	public static void main(String[] args) {
		 Map<String , String> map = new HashMap<>();
	        map.put("郭靖","黄蓉");
	        map.put("杨过","小龙女");
	        map.put("韦小宝","双二");
	        //利用Lambda遍历
	        map.forEach(new BiConsumer<String, String>() {
	            @Override
	            public void accept(String key, String value) {
	                System.out.println(key+" ="+value);
	            }
	        });
	        System.out.println("===================");
	        map.forEach(( key, value) -> System.out.println(key+" ="+value));


	}

}
